﻿@model AntUnion.FrameWork.Model.Models.Promotion
@{
    ViewData["Title"] = "Create";
    Layout = "~/Areas/Console/Views/Shared/_Layout.cshtml";
}
@section head{
    <script type="text/javascript">
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'form'], function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , table = layui.table
                , parentFrameIndex = parent.layer.getFrameIndex(window.name); //获取窗口索引;

            /**多语言初始化 */
            top.SetFormPageLanguage(layui);

            /* 监听提交 */
            form.on('submit(submit-form)', function (data) {
                var postData = {
                    "cont": $("#cont").val(),
                };
                $.ajax({
                    type: "POST",
                    url: "/Referral/SendApplication",
                    data: postData, // 你的formid
                    async: true,
                    error: function (request) {
                        alert("Connection error");
                    },
                    beforeSend: function (xhr) {
                        layui.layer.load();
                    },
                    success: function (data) {
                        var item = eval(data);
                        if (item.code == 0) {
                            /**提示语弹框 */
                            top.ShowMessageByKey(layui, item.msg, 6, 1000, function () {
                                 location.reload();
                                parent.layui.index.openTabsPage("/Referral/Application");
                                //初始化导航选项卡（选中新建标签卡）
                                parent.layui.element.render('nav');
                            });
                        } else {
                            /**提示语弹框 */
                            top.ShowMessageByKey(layui, item.msg, 0, 1000);
                        }
                        layer.closeAll('loading');
                    }
                });
                return false;
            });

        });
    </script>
}

    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">

                <div class="layui-form-item layui-form-text" style="padding:40px;">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <div>加入ACY代理计划，您将有机会通过介绍客户开户来获得可观且持续的佣金收入。我们的代理计划提供了全套市场营销资源，帮助您最大化收益。</div>
                            <br>
                            <div>我们先进的分析和追踪工具可以充分激发您的营销潜力。由数据驱动决策，让您的投资回报率达到前所未有的高度。</div>
                        </div>
                    </div>
                    <div class="layui-row" style="padding-top:40px;">
                        <div class="layui-col-xs12 layui-col-md5" style="text-align:center;">
                            <div class="image-container"><img src="/images/introducingBroker.png" alt="introducingBrokerImage" style="width:80%;"></div>
                        </div>
                        <div class="layui-col-xs12 layui-col-md7">
                            <div class="section-main-content">
                                <span class="main-content-title">加入ACY合作伙伴计划，提高您赚钱的能力，并获得以下优势：</span>
                                <div class="main-content">
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">多层定制化交易奖励，慷慨返利机制</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">全套高转化率市场营销资源</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">完整分析与追踪仪表盘</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">有机会获得可观且持续的佣金收入</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">专属的合作伙伴经理</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">佣金即时入账</span></div>
                                    <div class="main-content-item"><span class="check-container"><img src="" alt="introducingBrokerCheckIcon"></span> <span class="check-text">24/5多语言支持</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row" style="padding-top:40px;">
                        <div class="layui-col-xs12 layui-col-md7">
                            <div class="section-main-content" style="padding-top:50px">
                                <span class="main-content-title" style="font-size: 22px;line-height: 32px;">
                                    在当前的经济环境下，寻找新的机遇，令收入多元化至关重要——我们的代理计划正好提供了这种机会。
                                </span>
                            </div>
                        </div>
                        <div class="layui-col-xs12 layui-col-md5" style="text-align:center;">
                            <div class="image-container"><img src="/images/introducingBrokerFooterImage.png" alt="introducingBrokerImage" style="width:80%;"></div>
                        </div>
                    </div>
                    <div class="layui-row" style="padding-top:40px;">
                        <div class="layui-col-lg12" style="padding-top:20px;">
                        @if (Model != null)
                        {

                            @if (Model.State == 0)
                            {
                                <span class="layui-badge layui-bg-blue">审核中</span>
                            }
                            else if (Model.State == 1)
                            {
                                <span class="layui-badge">拒绝</span>
                                <span style="padding:0 10px;color:red;">@Model.Remarks</span>
                            }
                            else if (Model.State == 2)
                            {
                                <span class="layui-badge  layui-bg-green">通过</span>
                            }

                        }
                        else
                        {
                            <span class="layui-badge layui-bg-black">未提交审核</span>
                        }
                    </div>
                    <div class="layui-col-lg12" style="padding-top:20px;">
                        <textarea class="layui-textarea" id="cont"></textarea>
                    </div>
                    <div class="layui-col-xs12" style="padding-top:20px;">
                        <button type="submit" class="layui-btn" lay-submit="" lay-filter="submit-form">立即提交</button>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>